1. The Field of the Invention
The present invention relates to computer languages. More particularly, the present invention relates to scripting languages and specifically to the management of scripts using Extensible Markup Language (XML) to format the scripts into a single file regardless of the scripting language used for each individual script.
2. The Prior State of the Art
People are becoming increasingly dependent on computers as they are used in many aspects of their lives including at home, at work, and at school. Because computers are so pervasive in our society, more and more tasks that were previously performed manually are becoming automated. Word processing programs are able to correct spelling and grammar on the fly as well as provide tools such as a dictionary and a thesaurus. Financial applications now allow us to access our accounts over the Internet and even make payments that are automatically deducted from our accounts. Other applications have been created to meet various consumer needs.
These applications are created through the use of programming languages, which are essentially a set of rules that instruct a computer to perform specific tasks. Programming languages such as Basic, C, C++, Pascal, and the like each have a special syntax that is used to formulate various instructions. A high level programming language is more like a human language and is more easily understood by the programmer when compared with machine language, which is strictly numerical in nature. The high level programming language has to be converted or compiled into machine language before it can be executed by a computer. In other words, high level programming languages serve as an intermediary between the programmer and the computer because the computer only understands machine language, but programmers have difficulty working with machine language.
While high level languages are easier for programmers to understand than machine language, they are not simple and inexperienced end users cannot easily write small applications to perform simple tasks. A solution to this problem is found in scripting languages, which are much simpler to learn and implement and are typically lightweight versions of high level programming languages.
Understandably, scripting languages, such as CGI, Perl, JavaScript, VBScript and the like, are relatively popular and are frequently used to automate a wide variety of tasks. Macros, for example, are scripts that automate tasks in some computer applications such as word processors and spreadsheet applications. Batch files are another example of scripts. In many local area networks, scripts are used when a user logs on to the network. Scripts are also used in the Internet. For instance, when a user performs a search, the search query is often passed to the search engine by a script and the results of the search are returned to the user using another script. In sum, scripts are used in many different situations and have a wide range of applications.
Each script file is specific to a particular language and the syntax of one script language cannot currently be mixed with the syntax of another script language. If different scripting languages are used in a single script, an error will result. Often, the language in which a script is written can be identified from the file extension. For example, a xe2x80x9c.vbsxe2x80x9d extension indicates that the script was written in VBScript. Because each scripting language typically has certain advantages and disadvantages when compared to other scripting languages, the scripts existing on a particular computer are often written in different languages. Often, a user may choose to write scripts in different languages to take advantage of the strengths of various scripting languages.
The number of scripts on a particular computer or computer system can be relatively high. Because the scripts are usually written for specific purposes, the scripts can be located across the file system of the computer and may be difficult to locate. In addition to these characteristics, scripts are usually executed from the command line. As a result, the names of the scripts are short and are not very descriptive of the scripts. Short non descriptive names can make it difficult to determine or ascertain the function of a particular script from the name of the script. This problem is compounded by the high number of scripts from which the user must often choose. When a user needs to execute a particular script, the user is faced with the tasks of determining which script file is the correct script file and locating the script file on the computer or computer system.
Scripting is used to automate a wide variety of tasks in computers and computer networks or systems and is a core component of many applications. Scripts are often used for large deployments, policies, silent processes, automated processes, and the like. Instead of managing each script as a separate file, the present invention allows all scripts to be encompassed in a single file regardless of the scripting languages used to create the scripts. Consolidating the scripts of a computer or of a computer system into a single file simplifies the task of managing the scripts and facilitates the identification and execution of a particular script. A user is also relieved of locating a particular script.
The present invention incorporates the scripts of a computer system into a single file using Extensible Markup Language (XML) or another suitable format. Script commands or statements are encapsulated within XML elements, which allows scripts written in different scripting languages to be included in the same file. The XML elements are also used to delimit and separate each individual script. Because XML is not associated with any particular scripting language and because the scripts are delimited by the XML elements, other information about the scripts may be included in the single file. For example, the language in which the script is written can be conveyed with the XML format. Another advantage of using XML to define the scripts is that more descriptive names and detailed functional descriptions can be provided for each script within the XML format of the file.
When a script is to be executed, the file containing the scripts is parsed. In one example, the names of each script are determined by the parser and presented to the user in a list. Alternatively, the user can be presented with the detailed description of each script and the user can select the appropriate script for execution from this list. Because the names parsed from the file are descriptive, a user can more easily select the appropriate script from the presented list. Once a script is selected, the selected script is executed by the appropriate scripting process. More specifically, the script statements or instructions of the selected script are parsed from the file and executed using the appropriate scripting process associated with the language in which the script is written.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The features and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. These and other features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.